home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
PRINTER
/
LBLMAGIC.ARJ
/
LM110S.EXE
/
lha
/
ICNSTRUC.DOC
< prev
next >
Wrap
Text File
|
1989-08-31
|
3KB
|
91 lines
TURBO PASCAL PROGRAMMERS:
This file contains the [Turbo] Pascal data and file structure
for LABEL MAGIC unpacked icons. Label Magic icons are normally stored packed
and must be converted to unpacked (using CONVICON.EXE, mentioned below) so
that they may be used with the following structure.
============================================================================
CONST
MaxX = 50;
MaxY = 50;
TYPE
{ UnPacked Icon DATA TYPE }
Icon_Type = ARRAY[1..MaxX,1..MaxY] OF BOOLEAN;
VAR
Icon : Icon_Type;
IconF : FILE OF Icon_Type; { Random access file type }
============================================================================
COMMENTS:
Icons are stored as record #0 in the random access file, IconF.
Your programs may shell into the conversion program (CONVICON.EXE), using the
appropriate parameters, to UNPACK the 350 byte icons. Packed (350 byte) icons
may be converted either to "unpacked" (shown above), "TEXT" ('*' and ' ') or
ASCII ('█', '▄', '▀', or ' ').
SIMPLE PROGRAMMING EXAMPLE:
{$M 16000,0,0}
PROGRAM Load_Icon;
USES
Dos;
TYPE
Icon_Type = ARRAY[1..50,1..50] OF BOOLEAN;
VAR
Icon : Icon_Type;
IconF : FILE OF Icon_Type;
BEGIN
EXEC( 'CONVICON.EXE',' U LM.ICN LM.ICN' ); { Unpack icon so I can use it }
ASSIGN( IconF,'LM.ICN' );
RESET( IconF );
READ(IconF,Icon);
CLOSE(IconF);
.
.
.
Do graphics whatever.
.
.
.
EXEC( 'CONVICON.EXE',' P LM.ICN LM.ICN' ); { Pack so Label Magic can use it }
END.
CONVICON.EXE Information (as used from the DOS command line):
============================================================================
CONVICON Version 1.0 - Copyright (C)1989 NEOCOM by Joseph M. Albanese
Label Magic Icon Utility
SYNTAX: C>convicon [OPTION] <infile.ext> <outfile.ext>
OPTIONS: T - Convert a packed icon (350 byte) to a text icon
I - Convert a text icon to a packed icon (350 byte)' );
A - Convert a packed icon (350 byte) to an ASCII icon' );
B - Convert an ASCII icon BACK to a packed icon');
U - Convert a packed icon (350 byte) to an UNpacked icon (2500 byte)' );
P - Convert an unpacked icon (2500 byte) to a PACKed icon (350 byte)' );
EXAMPLES: C>convicon t lm.icn lm.txt' );
C>convicon a lm.icn lm.asc' );
C>convicon b lm.asc lm.icn' );
============================================================================
ONE FINAL NOTE:
The unpacked icons, produced in label magic, do not necessarily have
to be stored one-per-file. A random access file of many [unpacked] icons could
be used to store an animation sequence of single-color objects to be used
in a game, for instance.